<template>
	<view>
		<view>
			<uni-nav-bar class="nav" color="white" left-icon="back" left-text="返回" title="交卷成功"
				backgroundColor="#3498DB" @clickLeft="backToTestList()">
			</uni-nav-bar>
		</view>
		<view class="box-1" style="display: flex;">
			<view class="text-word">
				客观题:
			</view>
			<view class="text-num" style="text-align: center;">
				{{questionPaper.sumScore}}
			</view>
		</view>
		<view>
			<circulate @getChild='getChild'>
			</circulate>
		</view>
		<view class="content">
			<view class="text">
				{{"你已交卷成功！主观题得分需待教师批阅后方可查看！"}}
			</view>
			<view class="link">
				<navigator url="../testList/testList">返回试卷列表>></navigator>
			</view>
		</view>
		<view>
			<button class="buttonLook" type="primary" @click="look">
				查看客观题答题
			</button>
		</view>
	</view>
</template>

<script>
	import circulate from "../../components/testDetail/testSuccess-circulate.vue"
	export default {
		data() {
			return {
				questionPaper: {
					sumScore: 0
				}
			}
		},
		components: {
			circulate
		},
		methods: {
			look() {
				// 跳转到考试详情页
				uni.navigateTo({
					url: "/pages/testSuccess/successDetail?id=0"
				})
			},
			getChild(e) {
				this.questionPaper.sumScore = e;
				//console.log("传值后的分数",this.questionPaper.sumScore);
			},
			backToTestList() {
				this.$router.push("/pages/testList/testList");
			}
		}
	}
</script>

<style lang="scss">
	.box-1 {
		align-items: center;
		margin: auto;
		// flex-direction: column;
		width: 354rpx;
		height: 254rpx;
		// background-color: #C0C0C0;
	}

	.text-num {
		text-align: center;
		margin-left: 10rpx;
		font-size: 150rpx;
		// color: $main-color;
		color: #3498DB;
	}

	.text-word {
		margin-top: 70rpx;
		color: #3498DB;
		font-size: 40rpx;
	}

	.buttonLook {
		background-color: #3498DB;
		bottom: 0;
		position: absolute;
		width: 750rpx;
		border-radius: 0;
	}

	.text {
		padding: 5px;
		margin-top: 15px;
		margin-bottom: 10px;
		width: 440rpx;
		text-align: center;
		//background-color: #3498DB;
	}

	.link {
		margin-top: 15px;
		color: #007AFF;
	}

	.content {
		margin-top: 40px;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
</style>
